import { get, post } from '../request';

/**
 * @deprecated 该方法已弃用
 * 将于以后版本删除
 */
export const login = (username, password) => {
  return post('/login', { username, password });
};

export const search = pageable => {
  return get('/users/', { params: pageable });
};

export const currentUser = () => {
  return get('/users/currentUser');
};

export const create = user => {
  return post('/users', user);
};
